.class Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;
.super Ljava/lang/Object;
.source "ElementWorkspaceSwitcher.java"

# interfaces
.implements Lcom/nemustech/tiffany/world/TFModel$OnTouchListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/nemustech/regina/ElementWorkspaceSwitcher;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;


# direct methods
.method constructor <init>(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)V
    .locals 0
    .parameter

    .prologue
    .line 346
    iput-object p1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onLongPressdown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 1
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 467
    const/4 v0, 0x0

    return v0
.end method

.method public onSelected(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 6
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 444
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v1

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v1

    if-ne v1, v5, :cond_2

    .line 445
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v1

    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFModel;->getParentHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v2

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;->getSlotIndex(Lcom/nemustech/tiffany/world/TFObject;)I

    move-result v0

    .line 446
    .local v0, selectedWorkspaceIdx:I
    if-ltz v0, :cond_0

    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v1

    invoke-virtual {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;->getSlotCount()I

    move-result v1

    if-gt v1, v0, :cond_1

    .line 447
    :cond_0
    const-string v1, "ElementWorkspaceSwitcher"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "workspace selected fail "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    move v1, v4

    .line 460
    .end local v0           #selectedWorkspaceIdx:I
    :goto_0
    return v1

    .line 451
    .restart local v0       #selectedWorkspaceIdx:I
    :cond_1
    const-string v1, "ElementWorkspaceSwitcher"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "workspace selected "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 452
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-virtual {v1, v0}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->animateToWorkspaceFromWorkspaceSwitcher(I)V

    move v1, v5

    .line 453
    goto :goto_0

    .line 456
    .end local v0           #selectedWorkspaceIdx:I
    :cond_2
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v1

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v1

    const/4 v2, 0x3

    if-ne v1, v2, :cond_3

    move v1, v4

    .line 458
    goto :goto_0

    :cond_3
    move v1, v4

    .line 460
    goto :goto_0
.end method

.method public onTouchDown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 15
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    .line 350
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v10}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v10

    invoke-virtual {v10}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v10

    const/4 v11, 0x3

    if-ne v10, v11, :cond_1

    .line 352
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v10}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v1

    .line 353
    .local v1, c:Landroid/content/Context;
    invoke-virtual/range {p1 .. p1}, Lcom/nemustech/tiffany/world/TFModel;->getParentHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v5

    .line 354
    .local v5, parentHolder:Lcom/nemustech/tiffany/world/TFHolder;
    invoke-virtual {v5}, Lcom/nemustech/tiffany/world/TFHolder;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v8

    .line 357
    .local v8, world:Lcom/nemustech/tiffany/world/TFWorld;
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v10}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$900(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)F

    move-result v10

    const/4 v11, 0x0

    cmpg-float v10, v10, v11

    if-gez v10, :cond_0

    .line 358
    const/4 v10, 0x3

    new-array v4, v10, [F

    .line 359
    .local v4, location:[F
    invoke-virtual {v5, v4}, Lcom/nemustech/tiffany/world/TFHolder;->getAbsLocation([F)V

    .line 360
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v11, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v11

    invoke-virtual {v5}, Lcom/nemustech/tiffany/world/TFHolder;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v12

    const/4 v13, 0x2

    aget v13, v4, v13

    const/high16 v14, 0x4000

    invoke-static {v11, v12, v13, v14}, Lcom/nemustech/regina/RUtils;->calcCorrectionRatio(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;FF)F

    move-result v11

    invoke-static {v10, v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$902(Lcom/nemustech/regina/ElementWorkspaceSwitcher;F)F

    .line 362
    .end local v4           #location:[F
    :cond_0
    const/4 v10, 0x0

    invoke-virtual {v5, v10}, Lcom/nemustech/tiffany/world/TFHolder;->getLocation(I)F

    move-result v10

    iget-object v11, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$900(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)F

    move-result v11

    mul-float/2addr v10, v11

    const/4 v11, 0x1

    invoke-virtual {v5, v11}, Lcom/nemustech/tiffany/world/TFHolder;->getLocation(I)F

    move-result v11

    iget-object v12, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v12}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$900(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)F

    move-result v12

    mul-float/2addr v11, v12

    const/high16 v12, 0x4000

    invoke-virtual {v5, v10, v11, v12}, Lcom/nemustech/tiffany/world/TFHolder;->locate(FFF)V

    .line 366
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v10}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v10

    const/4 v11, 0x2

    invoke-virtual {v10, v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;->getLocation(I)F

    move-result v10

    const/high16 v11, 0x4000

    add-float v9, v10, v11

    .line 367
    .local v9, z:F
    move/from16 v0, p3

    float-to-int v0, v0

    move v10, v0

    invoke-static {v1, v8, v10, v9}, Lcom/nemustech/regina/RUtils;->convertTo3DPosX(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;IF)F

    move-result v6

    .line 368
    .local v6, touchX:F
    move/from16 v0, p4

    float-to-int v0, v0

    move v10, v0

    invoke-static {v1, v8, v10, v9}, Lcom/nemustech/regina/RUtils;->convertTo3DPosY(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;IF)F

    move-result v7

    .line 369
    .local v7, touchY:F
    const/4 v10, 0x0

    invoke-virtual {v5, v10}, Lcom/nemustech/tiffany/world/TFHolder;->getLocation(I)F

    move-result v2

    .line 370
    .local v2, centerX:F
    const/4 v10, 0x1

    invoke-virtual {v5, v10}, Lcom/nemustech/tiffany/world/TFHolder;->getLocation(I)F

    move-result v3

    .line 371
    .local v3, centerY:F
    const v10, 0x3f333333

    invoke-virtual {v5, v10}, Lcom/nemustech/tiffany/world/TFHolder;->setOpacity(F)V

    .line 372
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v11, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v11

    invoke-virtual {v11, v5}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;->getSlotIndex(Lcom/nemustech/tiffany/world/TFObject;)I

    move-result v11

    invoke-static {v10, v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$002(Lcom/nemustech/regina/ElementWorkspaceSwitcher;I)I

    .line 374
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v10}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v10

    const/4 v11, 0x0

    invoke-virtual {v5, v10, v11}, Lcom/nemustech/tiffany/world/TFHolder;->detachFrom(Lcom/nemustech/tiffany/world/TFHolder;Z)V

    .line 375
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v10}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v10

    iget-object v11, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)I

    move-result v11

    invoke-virtual {v5, v10, v11}, Lcom/nemustech/tiffany/world/TFHolder;->attachTo(Lcom/nemustech/tiffany/world/TFHolder;I)V

    .line 376
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    sub-float v11, v6, v2

    invoke-static {v10, v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1002(Lcom/nemustech/regina/ElementWorkspaceSwitcher;F)F

    .line 377
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    sub-float v11, v7, v3

    invoke-static {v10, v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1102(Lcom/nemustech/regina/ElementWorkspaceSwitcher;F)F

    .line 378
    const-string v10, "ElementWorkspaceSwitcher"

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string v12, "Nearest index on touch down is "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-object v12, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v12}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)I

    move-result v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    invoke-static {v10, v11}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 379
    const-string v10, "WorkspaceExploring"

    new-instance v11, Ljava/lang/StringBuilder;

    invoke-direct {v11}, Ljava/lang/StringBuilder;-><init>()V

    const-string v12, "Dragging workspace start on - workspace index: "

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v11

    iget-object v12, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v12}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)I

    move-result v12

    invoke-virtual {v11, v12}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v11

    invoke-virtual {v11}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v11

    const/4 v12, 0x1

    invoke-static {v10, v11, v12}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 382
    iget-object v10, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v11, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1300(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Z

    move-result v11

    invoke-static {v10, v11}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1202(Lcom/nemustech/regina/ElementWorkspaceSwitcher;Z)Z

    .line 383
    const/4 v10, 0x1

    .line 386
    .end local v1           #c:Landroid/content/Context;
    .end local v2           #centerX:F
    .end local v3           #centerY:F
    .end local v5           #parentHolder:Lcom/nemustech/tiffany/world/TFHolder;
    .end local v6           #touchX:F
    .end local v7           #touchY:F
    .end local v8           #world:Lcom/nemustech/tiffany/world/TFWorld;
    .end local v9           #z:F
    :goto_0
    return v10

    :cond_1
    const/4 v10, 0x0

    goto :goto_0
.end method

.method public onTouchDrag(Lcom/nemustech/tiffany/world/TFModel;IFFFFI)Z
    .locals 11
    .parameter "model"
    .parameter "faceIndex"
    .parameter "sx"
    .parameter "sy"
    .parameter "ex"
    .parameter "ey"
    .parameter "tickPassed"

    .prologue
    .line 407
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v8

    invoke-virtual {v8}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v8

    const/4 v9, 0x3

    if-ne v8, v9, :cond_3

    .line 408
    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFModel;->getParentHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v3

    .line 411
    .local v3, parentHolder:Lcom/nemustech/tiffany/world/TFHolder;
    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFHolder;->getOpacity()F

    move-result v8

    const v9, 0x3f333333

    cmpl-float v8, v8, v9

    if-eqz v8, :cond_0

    .line 412
    invoke-virtual {p0, p1, p2, p3, p4}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->onTouchDown(Lcom/nemustech/tiffany/world/TFModel;IFF)Z

    .line 416
    :cond_0
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v1

    .line 417
    .local v1, c:Landroid/content/Context;
    invoke-virtual {v3}, Lcom/nemustech/tiffany/world/TFHolder;->getWorld()Lcom/nemustech/tiffany/world/TFWorld;

    move-result-object v6

    .line 418
    .local v6, world:Lcom/nemustech/tiffany/world/TFWorld;
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v8

    const/4 v9, 0x2

    invoke-virtual {v8, v9}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;->getLocation(I)F

    move-result v8

    const/high16 v9, 0x4000

    add-float v7, v8, v9

    .line 419
    .local v7, z:F
    move/from16 v0, p5

    float-to-int v0, v0

    move v8, v0

    invoke-static {v1, v6, v8, v7}, Lcom/nemustech/regina/RUtils;->convertTo3DPosX(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;IF)F

    move-result v8

    iget-object v9, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v9}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)F

    move-result v9

    sub-float v4, v8, v9

    .line 420
    .local v4, tiffanyX:F
    move/from16 v0, p6

    float-to-int v0, v0

    move v8, v0

    invoke-static {v1, v6, v8, v7}, Lcom/nemustech/regina/RUtils;->convertTo3DPosY(Landroid/content/Context;Lcom/nemustech/tiffany/world/TFWorld;IF)F

    move-result v8

    iget-object v9, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v9}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)F

    move-result v9

    sub-float v5, v8, v9

    .line 421
    .local v5, tiffanyY:F
    const v8, 0x3f333333

    invoke-virtual {v3, v8}, Lcom/nemustech/tiffany/world/TFHolder;->setOpacity(F)V

    .line 422
    const/high16 v8, 0x4000

    invoke-virtual {v3, v4, v5, v8}, Lcom/nemustech/tiffany/world/TFHolder;->locate(FFF)V

    .line 423
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    iget-object v9, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v9}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Z

    move-result v9

    invoke-static {v8, v4, v5, v9}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1500(Lcom/nemustech/regina/ElementWorkspaceSwitcher;FFZ)I

    move-result v2

    .line 424
    .local v2, nearestIndex:I
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)I

    move-result v8

    if-eq v8, v2, :cond_2

    .line 425
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v8

    invoke-virtual {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;->getSlotCount()I

    move-result v8

    const/4 v9, 0x1

    sub-int/2addr v8, v9

    if-ne v2, v8, :cond_1

    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Z

    move-result v8

    if-nez v8, :cond_2

    .line 426
    :cond_1
    const-string v8, "ElementWorkspaceSwitcher"

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "Found new nearest slot : "

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    invoke-static {v8, v9}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    .line 427
    const-string v8, "WorkspaceExploring"

    new-instance v9, Ljava/lang/StringBuilder;

    invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V

    const-string v10, "Dragging workspace - nearest index: "

    invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9, v2}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v9

    const/4 v10, 0x1

    invoke-static {v8, v9, v10}, Lcom/nemustech/regina/RLog;->d(Ljava/lang/String;Ljava/lang/String;Z)I

    .line 430
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8, v2}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$002(Lcom/nemustech/regina/ElementWorkspaceSwitcher;I)I

    .line 431
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v8

    const/4 v9, 0x0

    invoke-virtual {v3, v8, v9}, Lcom/nemustech/tiffany/world/TFHolder;->detachFrom(Lcom/nemustech/tiffany/world/TFHolder;Z)V

    .line 432
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v8}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$100(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ElementWorkspaceSwitcher$workspaceSwitcherHolder;

    move-result-object v8

    iget-object v9, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v9}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)I

    move-result v9

    invoke-virtual {v3, v8, v9}, Lcom/nemustech/tiffany/world/TFHolder;->attachTo(Lcom/nemustech/tiffany/world/TFHolder;I)V

    .line 433
    iget-object v8, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-virtual {v8, v3}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->rearrangeWorkspaceThumbs(Lcom/nemustech/tiffany/world/TFHolder;)V

    .line 436
    :cond_2
    const/4 v8, 0x1

    .line 439
    .end local v1           #c:Landroid/content/Context;
    .end local v2           #nearestIndex:I
    .end local v3           #parentHolder:Lcom/nemustech/tiffany/world/TFHolder;
    .end local v4           #tiffanyX:F
    .end local v5           #tiffanyY:F
    .end local v6           #world:Lcom/nemustech/tiffany/world/TFWorld;
    .end local v7           #z:F
    :goto_0
    return v8

    :cond_3
    const/4 v8, 0x0

    goto :goto_0
.end method

.method public onTouchUp(Lcom/nemustech/tiffany/world/TFModel;IFF)Z
    .locals 4
    .parameter "model"
    .parameter "faceIndex"
    .parameter "x"
    .parameter "y"

    .prologue
    const/4 v3, -0x1

    .line 391
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$200(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)Lcom/nemustech/regina/ReginaLauncher;

    move-result-object v1

    invoke-virtual {v1}, Lcom/nemustech/regina/ReginaLauncher;->getViewMode()I

    move-result v1

    const/4 v2, 0x3

    if-ne v1, v2, :cond_0

    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$000(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)I

    move-result v1

    if-eq v1, v3, :cond_0

    .line 393
    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFModel;->getParentHolder()Lcom/nemustech/tiffany/world/TFHolder;

    move-result-object v0

    .line 394
    .local v0, parentHolder:Lcom/nemustech/tiffany/world/TFHolder;
    const/high16 v1, 0x3f80

    invoke-virtual {v0, v1}, Lcom/nemustech/tiffany/world/TFHolder;->setOpacity(F)V

    .line 395
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    const/4 v2, 0x0

    invoke-virtual {v1, v2}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->rearrangeWorkspaceThumbs(Lcom/nemustech/tiffany/world/TFHolder;)V

    .line 396
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$1400(Lcom/nemustech/regina/ElementWorkspaceSwitcher;)V

    .line 397
    iget-object v1, p0, Lcom/nemustech/regina/ElementWorkspaceSwitcher$5;->this$0:Lcom/nemustech/regina/ElementWorkspaceSwitcher;

    invoke-static {v1, v3}, Lcom/nemustech/regina/ElementWorkspaceSwitcher;->access$002(Lcom/nemustech/regina/ElementWorkspaceSwitcher;I)I

    .line 398
    const/4 v1, 0x1

    .line 401
    .end local v0           #parentHolder:Lcom/nemustech/tiffany/world/TFHolder;
    :goto_0
    return v1

    :cond_0
    const/4 v1, 0x0

    goto :goto_0
.end method
